<?php

/**
 * @author liyi
 * @copyright 2018.12.24
 * 2048消消乐 定时任务
 */

namespace Hexagongame\Controller;
use Think\Log;

class CrontabController {

    // 周一 00:00:00 定时重置排行榜数据
    public function update_rank() {
        $map['id'] = ['gt',1];
        $ret = M('users')->where($map)->save(array('good_score'=>0));
        if($ret){
            Log::write('2048消消乐周一更新排行榜成功','NEWS');
        }else{
            Log::write('2048消消乐周一更新排行榜失败','NEWS');
        }

    }

}